package _22作业._递归;

import java.io.File;

public class T3 {
    public static void main(String[] args) {
        File file = new File("D:\\黑马java培训班\\代码\\itcast\\JavaSE\\day10\\abd");
        printPath(file);
    }
    public static void printPath(File file){
        if (file.isFile()){
            System.out.println(file.getName());
        }if (file.isDirectory()){
            File[] files = file.listFiles();
            for (File f : files) {
                if (f.isFile()){
                    System.out.println(f.getPath());
                }else if (f.isDirectory()){
                    printPath(f);
                }
            }
        }
    }
}
